<template>
  <div class="basic_information">
    <div style="padding: 10px">
      <el-descriptions :column="2">
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="供货商"
          >{{
            detailsobj.supplier_name ? detailsobj.supplier_name : "-"
          }}</el-descriptions-item
        >
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="商户等级"
          >{{
            detailsobj.SupplierInfo ? detailsobj.SupplierInfo.LevelName : "-"
          }}</el-descriptions-item
        >
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="联系人"
          >{{
            detailsobj.responsible_person ? detailsobj.responsible_person : "-"
          }}</el-descriptions-item
        >
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="联系电话"
          >{{
            detailsobj.supplier_mobile ? detailsobj.supplier_mobile : "-"
          }}</el-descriptions-item
        >
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="联系地址"
          >{{
            detailsobj.address ? detailsobj.address : "-"
          }}</el-descriptions-item
        >
      </el-descriptions>
    </div>

    <div class="informationTitleView">
      <div class="leftBox">
        <div class="leftborder"></div>
        <div class="text">关联账户</div>
      </div>
      <div class="right">
        <i
          v-if="
            detailsobj.admin_info
              ? detailsobj.admin_info.nickname
                ? true
                : false
              : false
          "
          >已关联</i
        >
        <i v-else style="color: #f78989">未关联</i>
      </div>
    </div>
    <div style="padding: 10px">
      <el-descriptions :column="2">
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="账户昵称"
          >{{
            detailsobj.admin_info && detailsobj.admin_info.nickname
              ? detailsobj.admin_info.nickname
              : "-"
          }}</el-descriptions-item
        >
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsLabel"
          label="联系方式"
          >{{
            detailsobj.admin_info && detailsobj.admin_info.phone ? detailsobj.admin_info.phone : "-"
          }}</el-descriptions-item
        >
      </el-descriptions>
    </div>
    <div class="informationTitleView">
      <div class="leftBox">
        <div class="leftborder"></div>
        <div class="text">其他信息</div>
      </div>
      <div class="right">
        <!-- <i v-if="true">已关联</i>
        <i v-else style="color: #f78989">未关联</i> -->
      </div>
    </div>
    <div style="padding: 10px">
      <el-descriptions :column="2">
        <el-descriptions-item
          labelClassName="descriptionsLabel"
          content-class-name="descriptionsrich_text"
          label="备注"
          >{{
            detailsobj.remark ? detailsobj.remark : "无"
          }}</el-descriptions-item
        >
      </el-descriptions>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    detailsobj: {
      type: Object,
      default: {},
    },
  },
};
</script>

<style lang="scss">
.basic_information {
  .descriptionsLabel {
    width: 65px;
    font-size: 14px;
    color: #4e5969;
    font-weight: 700;
  }
  .descriptionsrich_text {
    background-color: #f7f8fa;
    padding: 5px 10px;
    border-radius: 5px;
    min-height: 100px;
    color: #888888;
    font-size: 14px;
  }
  .informationTitleView {
    height: 40px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    .leftBox {
      display: flex;
      .leftborder {
        width: 5px;
        height: 100%;
        background-color: #1890ff;
      }
      .text {
        margin-left: 20px;
        font-size: 14px;
        font-weight: 700;
        color: #4e5969;
        line-height: 40px;
      }
    }
    .right {
      line-height: 40px;
      font-size: 12px;
      margin-right: 20px;
      span {
        color: #4e5969;
        font-weight: 700;
      }
      i {
        font-style: normal;
        color: #85ce61;
        font-weight: 700;
        margin-left: 10px;
      }
    }
  }
}
</style>
